﻿Imports System.ComponentModel
<Serializable()> Public MustInherit Class ImageLayer
    Inherits Layer




    Public Sub New(ByVal ln As String, ByVal fn As String)
        MyBase.new(ln, fn)

        isUseTran = True

    End Sub

    Protected Sub New( _
      ByVal info As System.Runtime.Serialization.SerializationInfo, _
      ByVal context As System.Runtime.Serialization.StreamingContext)

        MyBase.New(info, context)

    End Sub



    Protected Overrides Sub DrawText()

    End Sub



    '图像特有属性
    Protected isUseTran As Boolean

    <CategoryAttribute("特殊信息"), _
  DisplayName("是否使用透明")> _
  Public Property UseTransParency() As Boolean
        Get
            Return isUseTran
        End Get
        Set(ByVal value As Boolean)
            isUseTran = value
            Me.IsUseTranChanged()
        End Set
    End Property

    Protected Sub IsUseTranChanged()
        Dim img As MapWinGIS.Image = mapwin.get_GetObject(m_iLayer)
        img.UseTransparencyColor() = isUseTran

    End Sub



    '保存和加载
    Public Overrides Sub Save()




    End Sub






    Public Overrides Sub Dispose()

        Dim img As MapWinGIS.Image = mapwin.get_GetObject(m_iLayer)
        img.Close()
        img = Nothing

    End Sub



    Public Overrides Sub InitLayer(ByRef m As AxMapWinGIS.AxMap)

        InitBaseProp()

    End Sub

    Public Overrides Sub InitNewLayer(ByRef m As AxMapWinGIS.AxMap, ByVal OutPath As String)

    End Sub

    Public Overrides Sub InitProp()

    End Sub

    Public Overrides Sub ReLoad(ByRef m As AxMapWinGIS.AxMap, ByVal fPath As String)

    End Sub

    Public Overrides Sub SaveAs(ByVal strPath As String)

    End Sub
End Class
